import React, {useEffect} from "react";
import FormView from "@/components/ProcessDetail/form";
import {Tabs, TabsProps} from "antd";
import ProcessRecords from "@/components/ProcessDetail/processRecords";
import FlowXmlAndNodeView from "@/components/ProcessDetail/flowXmlAndNode";

interface MyComponentProps {
    processDetail:{
        deployId?: number;
        procInsId?: number;
    };
}

const finishTaskDetailView: React.FC<MyComponentProps> = (props) => {
const { processDetail } = props;
    useEffect(() => {
        console.log(props.processDetail,processDetail);
    }, []);
    const items: TabsProps['items'] = [
        {
            key: '1',
            label: '表单',
            children:<FormView processDetail={processDetail}></FormView>,
        },
        {
            key: '2',
            label: '流程记录',
            children: <ProcessRecords processDetail={processDetail}></ProcessRecords>,
        },
        {
            key: '3',
            label: '流程图',
            children: <FlowXmlAndNodeView processDetail={processDetail}></FlowXmlAndNodeView>,
        },
    ];
    return (
        <div>
            <Tabs destroyInactiveTabPane={true} defaultActiveKey="1" items={items}  />
            {/*{ JSON.stringify(props.processDetail) }*/}
        </div>
    )
}
export default finishTaskDetailView;
